package ru.nstu.isma.core.lang.ast;

import ru.nstu.isma.core.hsm.HMEquation;
import ru.nstu.isma.core.lang.ast.visitor.VariableVisitor;
import org.antlr.v4.runtime.misc.NotNull;

/**
 * by Alexey Bessonov
 * Date: 28.11.13
 * Time: 23:01
 */
public class TestVisitor extends LismaBaseVisitor<Integer> {

    @Override
    public Integer visitVar_ident(@NotNull LismaParser.Var_identContext ctx) {
        System.out.println(ctx.getChild(0).getText());
        return super.visitVar_ident(ctx);    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public Integer visitConstant(@NotNull LismaParser.ConstantContext ctx) {

        return super.visitConstant(ctx);    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public Integer visitEquation(@NotNull LismaParser.EquationContext ctx) {
        VariableVisitor dd = new VariableVisitor();
        HMEquation e =  dd.visit(ctx.getChild(0));
        System.out.println(e);
        return super.visitEquation(ctx);    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public Integer visitAdditiveExpression(@NotNull LismaParser.AdditiveExpressionContext ctx) {
        return super.visitAdditiveExpression(ctx);
    }

    @Override
    public Integer visitAdditiveExpressionOperator(@NotNull LismaParser.AdditiveExpressionOperatorContext ctx) {
        return super.visitAdditiveExpressionOperator(ctx);    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public Integer visitPrimary(@NotNull LismaParser.PrimaryContext ctx) {
        return super.visitPrimary(ctx);    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public Integer visitPartial_operand(@NotNull LismaParser.Partial_operandContext ctx) {
        return super.visitPartial_operand(ctx);    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public Integer visitState_from(@NotNull LismaParser.State_fromContext ctx) {
        return super.visitState_from(ctx);    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public Integer visitApproximated_var(@NotNull LismaParser.Approximated_varContext ctx) {
        return super.visitApproximated_var(ctx);    //To change body of overridden methods use File | Settings | File Templates.
    }
}
